package com.artezio.vacation.dao;

import com.artezio.vacation.domain.Vacation;
import com.artezio.vacation.domain.VacationStatus;

import java.util.List;

/**
 * Dao for vacation objects.
 * Provide different vacation searching methods.
 */
public interface VacationDAO extends EntityDAO<Vacation> {

    /**
     * Find all vacations for the user with the given id.
     * List includes vacations with all statuses(expired, active and so on).
     *
     * @param userId id of the user
     * @return list of vacations
     */
    public List<Vacation> findByUser(long userId);

    /**
     * Find all vacations which have the some status.
     *
     * @param status vacations status {@link VacationStatus}
     * @return list of vacations
     */
    public List<Vacation> findByStatus(VacationStatus status);
}
